<template>
    <MyLayout>
        <template #header>
            <div>
                <el-button type="success" size="small" round>保存</el-button>
                <el-button type="primary" size='small' round >取消</el-button>
            </div>
        </template>
        <main>
            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
                <el-col  :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="供应商名字 :" prop="name" >
                        <el-input v-model="ruleForm.name" placeholder="供应商名字"></el-input>
                    </el-form-item>            
                </el-col> 
                <el-col :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="合同 :" prop="name">
                        <el-input v-model="ruleForm.name" placeholder="选择合同"></el-input>
                    </el-form-item> 
                </el-col>
                <el-col  :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="采购优先级 :" prop="region">
                        <el-select v-model="ruleForm.region">
                            <el-option label="最优" value="最优"></el-option>
                            <el-option label="优等" value="优等"></el-option>
                            <el-option label="良好" value="良好"></el-option>
                            <el-option label="一般" value="一般"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col  :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="开票地址 :" prop="name">
                        <el-input v-model="ruleForm.name" placeholder="开票地址"></el-input>
                    </el-form-item>
                </el-col>
                <el-col  :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="付款条件 :" prop="name">
                        <el-input v-model="ruleForm.name" placeholder="付款条件"></el-input>
                    </el-form-item>
                </el-col>
                <el-col  :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="负责人 :" prop="name"> 
                        <el-input v-model="ruleForm.name" placeholder="负责人"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="联系人 :" prop="name">
                        <el-input el-input v-model="ruleForm.name" placeholder="联系人"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="联系电话 :" prop="name">
                        <el-input v-model="ruleForm.name" placeholder="联系电话"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="成立日期 :" required >
                        <el-date-picker v-model="value1" type="date" placeholder="选择日期" />
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="注册资金 :" prop="name">
                        <el-input v-model="ruleForm.name" placeholder="注册资金"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="开户银行 :" prop="bank">
                        <el-select v-model="ruleForm.bank" placeholder="开户银行">
                            <el-option label="区域一" value="shanghai"></el-option>
                            <el-option label="区域二" value="beijing"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="设备状态 :" prop="region">
                        <el-select v-model="ruleForm.region">
                            <el-option label="区域一" value="shanghai"></el-option>
                            <el-option label="区域二" value="beijing"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="商品产地 :" prop="place">
                        <el-select v-model="ruleForm.place" placeholder="商品产地">
                            <el-option label="区域一" value="shanghai"></el-option>
                            <el-option label="区域二" value="beijing"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="24" :md="24" :lg="24">
                    <el-form-item label="备注 :" prop="desc">
                        <el-input type="textarea" v-model="ruleForm.desc" placeholder="备注"></el-input>
                    </el-form-item>
                </el-col>
            </el-form>
        </main>
    </MyLayout>
</template>
<script>
  export default {
    data() {
      return {
        ruleForm: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: '',
          value1:'',
          bank:'',
          place:''
        },
        rules: {
          name: [
            { required: true, message: '请输入活动名称', trigger: 'blur' },
            { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
          ],
          region: [
            { required: true, message: '请选择活动区域', trigger: 'change' }
          ],
          date1: [
            { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
          ],
          date2: [
            { type: 'date', required: true, message: '请选择时间', trigger: 'change' }
          ],
          type: [
            { type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
          ],
          resource: [
            { required: true, message: '请选择活动资源', trigger: 'change' }
          ],
        }
      };
    },
    methods: {
      submitForm(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            alert('submit!');
          } else {
            console.log('error submit!!');
            return false;
          }
        });
      },
      resetForm(formName) {
        this.$refs[formName].resetFields();
      }
    }
  }
</script>

<style lang="less" scope>
    main{
        height:100%;
    }
</style>
=======
    <my-layout>
        <template #header>
            <el-button type="success" size="small" @click="saveEve">保存</el-button>
            <el-button size="small" @click='escEve'>返回</el-button>
        </template>
        <el-form>
            <el-row>
                <el-col :xs="24" :sm="12" :md="8" :lg="6">
                    <el-form-item label="产品名字" prop="name">
                    <el-input v-model="page.name" placeholder="请输入产品名称"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </my-layout>
</template>
<script>
export default {
    data(){
        return {
            
        }
    },
    mounted(){

    },
    methods: {
        saveEve(){

        },
        escEve(){
            this.$router.go(-1)
        }
    }
}
</script>
>>>>>>> 82012fde2a79feffd5242c408647a42c9b3cae16
